package io.lkt.modules.sys.service;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.lkt.common.utils.PageUtils;
import io.lkt.common.utils.Query;

import io.lkt.modules.sys.dao.BBeginnerArticleInfoDao;
import io.lkt.modules.sys.entity.BBeginnerArticleInfoEntity;


@Service("bBeginnerArticleInfoService")
public class BBeginnerArticleInfoServiceImpl extends ServiceImpl<BBeginnerArticleInfoDao, BBeginnerArticleInfoEntity> implements BBeginnerArticleInfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BBeginnerArticleInfoEntity> page = this.page(
                new Query<BBeginnerArticleInfoEntity>().getPage(params),
                new QueryWrapper<BBeginnerArticleInfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<BBeginnerArticleInfoEntity> queryList(Map<String, Object> params) {
        return baseMapper.queryList(params);
    }

    @Override
    public int queryListTotal(Map<String, Object> params) {
        return baseMapper.queryListTotal(params);
    }

    @Override
    public BBeginnerArticleInfoEntity getInfoById(Integer id) {
        return baseMapper.getInfoById(id);
    }

    @Override
    public BBeginnerArticleInfoEntity getBeginnerArticleInfoById(Integer id) {
        return baseMapper.getBeginnerArticleInfoById(id);
    }

    @Override
    public BBeginnerArticleInfoEntity getPlatformArticleInfo(String gzhCode, Integer articleTypeId, Integer articleId) {
        return baseMapper.getPlatformArticleInfo(gzhCode, articleTypeId, articleId);
    }

}
